package vn.hocweb.dao.dao_implement;

import java.sql.Connection;

import vn.hocweb.database.ConnectionPool;

public abstract class GenericDAO{
	private static ConnectionPool connectionPool;
	
	protected Connection getConnection(){
		return connectionPool.getConnection();
	}
	
	protected void freeConnection(Connection connection){
		connectionPool.freeConnection(connection);
	}
	
	public static void initConnectionPool(){
		connectionPool = ConnectionPool.getInstance();
	}
	
}
